package admin

import (
	"github.com/gogf/gf/v2/frame/g"
	"miaoyu/internal/model/admin"
)

type UserGetInfoReq struct {
	g.Meta `method:"get" `
}

type UserGetInfoRes struct {
	Id          uint   `json:"id"`
	IdentityKey string `json:"identity_key"`
	Payload     string `json:"payload"`
}

type UserIndexReq struct {
	g.Meta `method:"get" tags:"user" summary:"user"`
}
type UserIndexRes struct {
}

type UserListDoReq struct {
	g.Meta   `method:"get" tags:"user" summary:"user"`
	Keywords string `json:"keywords"` //关键词
	Page     int    `json:"page"`     //页码
	Limit    int    `json:"limit"`    //每页显示数
}
type UserListDoRes struct {
	g.Meta   `mime:"application/json"`
	userList []admin.UserItemOutput `json:"userList"`
}

type UserAddReq struct {
	g.Meta   `method:"get" tags:"user" summary:"user"`
	ParentId int `p:"parentId"`
}
type UserAddRes struct {
}
type UserEditReq struct {
	g.Meta `method:"get" tags:"user" summary:"user"`
	ResId  int `p:"resId"  v:"required#菜单信息不能为空"`
}
type UserEditRes struct {
}
type UserDelDoReq struct {
	g.Meta `method:"post" tags:"user"`
	ResId  int `json:"resId"`
}
type UserDelDoRes struct {
}
type UserSubmitDoReq struct {
	g.Meta       `method:"post" tags:"user" summary:"user"`
	ResId        int    `p:"resId"`
	UserName     string `p:"userName"`
	RealName     string `p:"realName"`
	Password     string `p:"password"`
	RePassword   string `p:"rePassword"`
	Email        string `p:"email"`
	Phone        string `p:"phone"`
	DepartmentId int    `p:"departmentId"`
	LevelId      int    `p:"levelId"`
	PositionId   int    `p:"positionId"`
	Status       int    `p:"status"`
	Bak          string `p:"bak"`
	OrderNum     int    `p:"orderNum"`
}
type UserSubmitDoRes struct {
}
type UserGrantReq struct {
	g.Meta `method:"get" tags:"user"`
	ResId  int `p:"resId"`
}
type UserGrantRes struct {
}
type UserGrantSubmitDoReq struct {
	g.Meta   `method:"post" tags:"user" `
	ResId    int   `p:"resId"`
	RoleList []int `json:roleList`
}
type UserGrantSubmitDoRes struct {
}
